Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StakingEscrow: function to wrap and topUp stake in threshold staking … #122

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

vzotova
Copy link
Member

@vzotova vzotova commented Sep 26, 2023

…contract without withdrawing to staker's account

Copy link
Member

@derekpierre derekpierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎸 - very minor comment. Looks great!

contracts/contracts/StakingEscrow.sol Outdated Show resolved Hide resolved
contracts/contracts/StakingEscrow.sol Outdated Show resolved Hide resolved
Comment on lines +343 to +345
vendingMachine.wrap(wrappedTokenAmount);
tToken.approve(address(tStaking), tTokenAmount);
tStaking.topUp(info.stakingProvider, uint96(tTokenAmount));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

@vzotova vzotova changed the base branch from main to development October 10, 2023 18:19
@vzotova vzotova changed the base branch from development to main October 10, 2023 18:19
contracts/contracts/StakingEscrow.sol Outdated Show resolved Hide resolved
contracts/contracts/StakingEscrow.sol Show resolved Hide resolved
StakerInfo storage info = stakerInfo[msg.sender];
require(info.stakingProvider != address(0), "There is no stake in T staking contract");
require(
tStaking.stakedNu(info.stakingProvider) == 0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that stakedNu() will be removed at some point?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, it will be in second upgrade for threshold staking contract for removing legacy

@vzotova vzotova force-pushed the wrap-top-up branch 2 times, most recently from 87ad4b8 to 29b227c Compare October 21, 2023 15:07
…contract without withdrawing to staker's account
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
@vzotova vzotova merged commit 5a9eb65 into nucypher:main Oct 27, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants